/* Copyright 2007-2008 dnAnalytics Project.
 *
 * Contributors to this file:
 * Patrick van der Velde
 *
 * This file is part of dnAnalytics.  dnAnalytics is licensed under the 
 * Microsoft Public License. See License.txt for a complete copy of the
 * license.
 */
using System;
using dnAnalytics.LinearAlgebra;
using System.Diagnostics;

namespace dnAnalytics.DebugVisualizers
{
    /// <summary>
    /// A <c>MatrixProperties</c> class for <c>DenseMatrix</c> objects.
    /// </summary>
    public sealed class DenseMatrixProperties : MatrixProperties
    {
        /// <summary>
        /// The matrix for which the properties are stored.
        /// </summary>
        private DenseMatrix m_Matrix;

        /// <summary>
        /// Creates a new instance of the <c>DenseMatrixProperties</c> class with the specified
        /// <paramref name="matrix"/>.
        /// </summary>
        /// <param name="matrix">The matrix for which the properties are stored.</param>
        /// <exception cref="ArgumentNullException">
        ///     Thrown if <paramref name="matrix"/> is <c>null</c>.
        /// </exception>
        public DenseMatrixProperties(DenseMatrix matrix)
        {
            if (matrix == null)
            {
                throw new ArgumentNullException();
            }

            m_Matrix = matrix;
        }

        /// <summary>
        /// Returns the matrix.
        /// </summary>
        protected override Matrix Matrix
        {
            [DebuggerStepThrough]
            get
            {
                return m_Matrix;
            }
        }
    }
}